﻿Public Class frmTabConstraintsSecurity
    Dim editNode As EditXML = New EditXML()

    Private Sub txtMRaccess_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtMRaccess.Leave
        editXMLFile()
    End Sub

    Private Sub txtMRuse_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtMRuse.Leave
        editXMLFile()
    End Sub

    Private Sub txtMRClassSys_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtMRClassSys.Leave
        editXMLFile()
    End Sub

    Private Sub txtMRSecDesc_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtMRSecDesc.Leave
        editXMLFile()
    End Sub

    Private Sub cboxMRClass_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboxMRClass.Leave
        editXMLFile()
    End Sub
    Public Sub editXMLFile()
        editNode.Edit("/metadata/metainfo/metac", txtMRaccess.Text.Trim())
        editNode.Edit("/metadata/metainfo/metuc", txtMRuse.Text.Trim())
        editNode.Edit("/metadata/metainfo/metsi/metscs", txtMRClassSys.Text.Trim())
        editNode.Edit("/metadata/metainfo/metsi/metshd", txtMRSecDesc.Text.Trim())
        editNode.Edit("/metadata/metainfo/metsi/metsc", cboxMRClass.SelectedItem)
    End Sub

    Private Sub button_example_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button_example.Click
        Dim helpForm As dialog_help = New dialog_help("ConstraintsSecurity")
        helpForm.ShowDialog()
    End Sub
End Class